﻿<%@ Page Title="Master Upload" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="MasterUpload.aspx.cs" Inherits="TestJQGrid.MasterUpload" %>

<%@ Register Assembly="Trirand.Web" TagPrefix="trirand" Namespace="Trirand.Web.UI.WebControls" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table style="width: 100%;" border="1px" >
        <tr>
            <td>
                <table style="width: 100%;" border="1px" >
                    <tr>
                        <td align="center" valign="top">
                            <asp:SqlDataSource ID="TableListDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:AgentBillingConnectionString %>"
                                SelectCommand="SELECT TableName FROM TablesList WHERE (TableType = @TableType)">
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="ExternalMaster" Name="TableType" Type="String" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                            <asp:Label ID="Label1" runat="server" Text="  Select Master Table  " BorderColor="Black"
                                BorderStyle="None" ForeColor="Black"></asp:Label>
                            &nbsp;
                            <asp:DropDownList ID="TableListDropDown" runat="server" DataSourceID="TableListDataSource"
                                DataTextField="TableName" DataValueField="TableName">
                            </asp:DropDownList>
                        </td>
                        <td align="left" valign="top">
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:FileUpload ID="FileUpload1" runat="server" Width="350px"></asp:FileUpload>
                            <br />
                            &nbsp;&nbsp;&nbsp;
                            <asp:Label ID="Label2" runat="server" Text="Delimiter" ForeColor="Black"></asp:Label>
                            &nbsp;
                            <asp:DropDownList ID="SeperatorDDL" runat="server" >
                                <asp:ListItem Value="," Selected="True">,</asp:ListItem>
                                <asp:ListItem Value="|">|</asp:ListItem>
                                <asp:ListItem Value="@">@</asp:ListItem>
                            </asp:DropDownList>

                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                            <asp:Button ID="Button1" runat="server" Text="View Data" OnClick="Button1_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center" valign="top" height="200px">
                            <asp:Panel ID="Panel1" runat="server" ScrollBars="Both" Height="300" Width="100%">
                                <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" ShowFooter="True"
                                    Width="800px" Height="200px" ShowHeaderWhenEmpty="True">
                                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                    <EditRowStyle BackColor="#999999" />
                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <PagerSettings FirstPageText="First" LastPageText="Last" NextPageText="Next" PreviousPageText="Prev"
                                        Mode="NextPreviousFirstLast" />
                                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                                </asp:GridView>
                            </asp:Panel>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr align="center" valign="middle">
            <td>
                <asp:Button ID="ErrorButton" runat="server" onclick="ErrorButton_Click" 
                    Text="Download Error/s" />
                <asp:Button ID="UploadButton" runat="server" Enabled="False" 
                    onclick="UploadButton_Click" Text="Upload to DataBase" />
                <asp:Button ID="ResetButton" runat="server" onclick="ResetButton_Click" 
                    Text="Reset Page" />
            </td>
        </tr>
    </table>
</asp:Content>
